import {
  Entity,
  PrimaryGeneratedColumn,
  Column,
  CreateDateColumn,
} from 'typeorm';
/* 
{
    "id": 1,
    "sender_id": 1000,
    "receiver_id": 2000,
    "content": "你好，我的肚子疼",
    "type": "question",
    "created_at": "2024-06-03T10:26:59.802Z"
} */
@Entity()
export class Consultation {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  user_id: number;

  @Column()
  type: string;

  @Column({ type: 'text' })
  content: string;

  @CreateDateColumn()
  created: Date;
}
